package pojo;

import java.util.Date;
import java.util.Objects;

public class ChangeRoom {
    private int changeId;
    private int stuId;
    private int old_dormId;
    private int old_bedId;
    private int new_dormId;
    private int new_bedId;
    private Date change_time;
    private int check_in_id;

    public ChangeRoom() {
    }

    public ChangeRoom(int changeId, int stuId, int old_dormId, int old_bedId, int new_dormId, int new_bedId, Date change_time, int check_in_id) {
        this.changeId = changeId;
        this.stuId = stuId;
        this.old_dormId = old_dormId;
        this.old_bedId = old_bedId;
        this.new_dormId = new_dormId;
        this.new_bedId = new_bedId;
        this.change_time = change_time;
        this.check_in_id = check_in_id;
    }

    public int getCheck_in_id() {
        return check_in_id;
    }

    public void setCheck_in_id(int check_in_id) {
        this.check_in_id = check_in_id;
    }

    public int getChangeId() {
        return changeId;
    }

    public void setChangeId(int changeId) {
        this.changeId = changeId;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public int getOld_dormId() {
        return old_dormId;
    }

    public void setOld_dormId(int old_dormId) {
        this.old_dormId = old_dormId;
    }

    public int getOld_bedId() {
        return old_bedId;
    }

    public void setOld_bedId(int old_bedId) {
        this.old_bedId = old_bedId;
    }

    public int getNew_dormId() {
        return new_dormId;
    }

    public void setNew_dormId(int new_dormId) {
        this.new_dormId = new_dormId;
    }

    public int getNew_bedId() {
        return new_bedId;
    }

    public void setNew_bedId(int new_bedId) {
        this.new_bedId = new_bedId;
    }

    public Date getChange_time() {
        return change_time;
    }

    public void setChange_time(Date change_time) {
        this.change_time = change_time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChangeRoom that = (ChangeRoom) o;
        return stuId == that.stuId &&
                old_dormId == that.old_dormId &&
                old_bedId == that.old_bedId &&
                new_dormId == that.new_dormId &&
                new_bedId == that.new_bedId &&
                Objects.equals(change_time, that.change_time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuId, old_dormId, old_bedId, new_dormId, new_bedId, change_time);
    }

    @Override
    public String toString() {
        return "ChangeRoom{" +
                "changeId=" + changeId +
                ", stuId=" + stuId +
                ", old_dormId=" + old_dormId +
                ", old_bedId=" + old_bedId +
                ", new_dormId=" + new_dormId +
                ", new_bedId=" + new_bedId +
                ", change_time=" + change_time +
                '}';
    }
}
